#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout);
#define pb push_back

const int N = 1<<20;
const db eps = 1e-9;

int n,cnt[N];
db p[N],ans;

int main (){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	scanf("%d",&n); n = 1<<n;
	for(int i = 0;i < n;i++) scanf("%lf",&p[i]),cnt[i] = cnt[i>>1] + (i & 1);
	for(int h = 2;h <= n;h <<= 1)
		for(int j = h >> 1,i = 0;i < n;i += h)
			for(int k = i;k < i + j;k++)
				p[k+j] += p[k];
	for(int i = 0;i < n;i++) if(1 - p[i^(n-1)] > eps) ans += (cnt[i] & 1 ? 1 : -1) / (1 - p[i^(n-1)]);
	if(ans < eps) puts("INF"); else printf("%.8lf",ans);
	return 0;
}

